package model

type Admin struct {
	AdminID         uint   `gorm:"primary_key;auto_increment"`
	Account         string `gorm:"type:varchar(20);not null;comment:'用户名'"`
	Nickname        string `gorm:"type:varchar(20);not null;comment:'昵称'"`
	Mobile          string `gorm:"type:varchar(11);not null;comment:'联系手机号'"`
	Address         string `gorm:"type:varchar(255);not null;default:'';comment:'联系地址'"`
	EquipmentNumber uint   `gorm:"not null;default:0;comment:'设备数量'"`
	CallbackURL     string `gorm:"type:varchar(255);not null;default:'';comment:'回调地址'"`
	TokenPass       string `gorm:"not null;comment:'获取token密码'"`
	Password        string `gorm:"type:char(32);not null;comment:'账户密码'"`
	LastSessionID   string `gorm:"type:char(32);not null;default:''"`
	CreateIP        string `gorm:"type:char(15);not null"`
	LastIP          string `gorm:"type:char(15);not null"`
	CreateTime      uint   `gorm:"not null"`
	LastTime        uint   `gorm:"not null"`
	RoleID          uint   `gorm:"not null;default:0"`
	AdminPID        uint   `gorm:"not null;default:0;comment:'所属上级账户'"`
	Level           uint8  `gorm:"not null;default:0"`
	State           uint8  `gorm:"not null;default:0;comment:'是否锁定，0否，1锁定'"`
	Status          uint8  `gorm:"not null;default:0"`
}
